﻿@model ScmThreePersonnelViewModel
@{
    Layout = null;
    ViewBag.Title = "三类人员台账-首页";
    int j = 0;
}

<div class="pageContent" style="padding: 5px">
    <div layouth="11" style="float: left; display: block; overflow: auto; width: 170px; border: solid 1px #CCC; line-height: 21px; background: #fff">
        <ul class="tree treeFolder">
            @*0=监理单位，1=土建，2=路面，3=交安，4=绿化，5=房建，6=机电，7=污水*@
            @{var tjList = Model.TheUnitList.FindAll((t) => { return t.UNIT_TYPE == 1; });
              var lmList = Model.TheUnitList.FindAll((t) => { return t.UNIT_TYPE == 2; });
              var jaList = Model.TheUnitList.FindAll((t) => { return t.UNIT_TYPE == 3; });
              var lhList = Model.TheUnitList.FindAll((t) => { return t.UNIT_TYPE == 4; });
              var fjList = Model.TheUnitList.FindAll((t) => { return t.UNIT_TYPE == 5; });
              var jdList = Model.TheUnitList.FindAll((t) => { return t.UNIT_TYPE == 6; });
              var wsList = Model.TheUnitList.FindAll((t) => { return t.UNIT_TYPE == 7; });}
            @if (tjList.Count > 0)
            { 
                <li><a href="javascript">土建</a>
                    <ul>
                        @foreach (var info in tjList)
                        {
                            var liId = "cl" + j;
                            <li><a id="@liId" href="@Url.Action("List", "ScmThreePersonnel", new { Section = info.UNIT_CODE })" target="ajax" rel="tzgl_slry_list">
                                @info.UNIT_CODE  </a>
                            </li>
                            j++;
                        }
                    </ul>
                </li>
            }
            @if (lmList.Count > 0)
            { 
                <li><a href="javascript">路面</a>
                    <ul>
                        @foreach (var info in lmList)
                        {
                            var liId = "cl" + j;
                            <li><a id="@liId" href="@Url.Action("List", "ScmThreePersonnel", new { Section = info.UNIT_CODE })" target="ajax" rel="tzgl_slry_list">@info.UNIT_CODE</a></li>
                            j++;
                        }
                    </ul>
                </li>
            }
            @if (jaList.Count > 0)
            { 
                <li><a href="javascript">交安</a>
                    <ul>
                        @foreach (var info in jaList)
                        {
                            var liId = "cl" + j;
                            <li><a id="@liId" href="@Url.Action("List", "ScmThreePersonnel", new { Section = info.UNIT_CODE })" target="ajax" rel="tzgl_slry_list">@info.UNIT_CODE</a></li>
                            j++;
                        }
                    </ul>
                </li>
            }
            @if (lhList.Count > 0)
            { 
                <li><a href="javascript">绿化</a>
                    <ul>
                        @foreach (var info in lhList)
                        {
                            var liId = "cl" + j;
                            <li><a id="@liId" href="@Url.Action("List", "ScmThreePersonnel", new { Section = info.UNIT_CODE })" target="ajax" rel="tzgl_slry_list">@info.UNIT_CODE</a></li>
                            j++;
                        }
                    </ul>
                </li>
            }
            @if (fjList.Count > 0)
            { 
                <li><a href="javascript">房建</a>
                    <ul>
                        @foreach (var info in fjList)
                        {
                            var liId = "cl" + j;
                            <li><a id="@liId" href="@Url.Action("List", "ScmThreePersonnel", new { Section = info.UNIT_CODE })" target="ajax" rel="tzgl_slry_list">@info.UNIT_CODE</a></li>
                            j++;
                        }
                    </ul>
                </li>
            }
            @if (jdList.Count > 0)
            { 
                <li><a href="javascript">机电</a>
                    <ul>
                        @foreach (var info in jdList)
                        {
                            var liId = "cl" + j;
                            <li><a id="@liId" href="@Url.Action("List", "ScmThreePersonnel", new { Section = info.UNIT_CODE })" target="ajax" rel="tzgl_slry_list">@info.UNIT_CODE</a></li>
                            j++;
                        }
                    </ul>
                </li>
            }
            @if (wsList.Count > 0)
            { 
                <li><a href="javascript">污水</a>
                    <ul>
                        @foreach (var info in wsList)
                        {
                            var liId = "cl" + j;
                            <li><a id="@liId" href="@Url.Action("List", "ScmThreePersonnel", new { Section = info.UNIT_CODE })" target="ajax" rel="tzgl_slry_list">@info.UNIT_CODE</a></li>
                            j++;
                        }
                    </ul>
                </li>
            }
        </ul>
    </div>

    <div id="tzgl_slry_list" class="unitBox" style="margin-left: 176px;">
        <!--#include virtual="list1.html" -->
    </div>
</div>
